package com.hzy.settings;

import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.BaseAdapter;
import android.widget.Button;

import com.hzy.listview.NotepadListActivity;
import com.hzy.login.MainFragmentActivity;
import com.hzy.text.R;
import com.sam.widget.headerBar.LeftImgTitleBar;

import java.util.Set;

/**
 * Created by Administrator on 2016/6/28 0028.
 */
public class SettingActivity extends AppCompatActivity{

    private LeftImgTitleBar leftImgTitleBar;
    private Button exitBtn;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_setting);
        initView();
        findView();
    }

    private void initView(){
        leftImgTitleBar = (LeftImgTitleBar) findViewById(R.id.setting_title);
        exitBtn = (Button) findViewById(R.id.exit_btn);
    }

    private void findView(){
        leftImgTitleBar.setOnTitleLeftClickListener(new LeftImgTitleBar.OnTitleLeftClickListener() {
            @Override
            public void onLeftClick() {
                finish();
            }
        });
        exitBtn.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(SettingActivity.this, MainFragmentActivity.class);
                startActivity(intent);
            }
        });
    }
}
